/**
 * 
 */

//office格式的正文修改
function _editContent(readOnly){
	//判断是否移动授权(获取序列号)
	$s.EditContent.getOfficeAuthKey({},{},errorBuilder({
		success : function(result) {
			if(result && result.officeAuthKey){
				summaryBO.officeLicense = result;
				summaryBO.type = "collaboration";
				summaryBO.readOnly = readOnly;
				summaryBO.isClearTrace = true;
				if(!readOnly){
					//修改正文时加锁
					WorkFlowDesignerUtil.lockH5Workflow(summaryBO["summary"].id, CopyWorkFlowLock.EDIT_CONTENT, function(ret) {
						if(ret) {
							LazyUtil.addLoadedFn("lazy_edit", function(){
								ContentEdit.init(summaryBO);
							});
						}
					});
				}else{
					LazyUtil.addLoadedFn("lazy_edit", function(){
						ContentEdit.init(summaryBO);
					});
				}
			}else{
				_alert(cmp.i18n("collaboration.edit.office.content.authorization"));
			}
        }
	}));
}

function _backPage(callBack){
	var btns = [{
        key : "giveuptip",
        name : cmp.i18n("collaboration.edit.office.content.confirm.save")//放棄修改正文
    },{
        key : "giveup",
        name : cmp.i18n("collaboration.page.lable.yes")//是
    }];
	
	cmp.dialog.actionSheet(btns,cmp.i18n("collaboration.page.lable.no"), function(item) {
        //点击操作
        if("giveup" == item.key){
        	callBack();
        }
    }, function() {
    	return;
    });
}